package com.hishop.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hishop.product.entity.AttrAttrgroupRelationEntity;
import com.hishop.product.entity.AttrEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 属性&属性分组关联
 * 
 * @author tanwenbin
 * @email 2466082499@qq.com
 * @date 2024-03-13 09:24:45
 */
@Mapper
public interface AttrAttrgroupRelationDao extends BaseMapper<AttrAttrgroupRelationEntity> {
    /**
     * 根据属性Id获取 属性和分组实体
     * @param attrId
     * @return
     */
    AttrAttrgroupRelationEntity selectByAttrId(@Param("attrId") Long attrId);

    Long selectGroupIdByAttrId(@Param("attrId") Long attrId);

    void updateGroupId(AttrEntity attr);

    Long[] selectAttrId(@Param("attrGroupId") Long attrGroupId);
}
